Not display the query string in browser.

Discussion in 'PHP' started by Mike, Aug 27, 2005.

  1. Mike

    Mike New Member

    Joined:
    Oct 19, 2004
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    0
    Home Page:
    http://www.go4expert.com/
    I dont know if this is possible but Can somebody show me how to hide my GET variables from appearing in the address bar?

    I have developed a site where i used only 1 page, wherein contents are added thru scripts and include files. The contents are called by using GET variables(e.g. index.php?a=show1). What i want to do is to be able to hide these variables from appearing in the address bar, so that it will look neater.

    Thank you.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    I doubt anything like this is possible in a straight forward manner. You are asking for something like I want to pass the data in URL's without actually passing it. What you can do is make the data something like one parameter that will uniquely identify the data and display the page accordingly to keep the url clean.

    Now as I mentioned in a straight forward manner so there should be something I refer to as non-straight forward and that is using the JavaScript and Form Post method to submit the data and that will make the URL's clean.

    Something like

    <A href = "url" OnClick = "SomeFunction()">

    Now what the SomeFunction does is

    Submits the Form with all the hidden fields With the Post method.

    Thanks
    Shabbir Bhimani
     
  3. Mike

    Mike New Member

    Joined:
    Oct 19, 2004
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    0
    Home Page:
    http://www.go4expert.com/
    Something a bit complicated. I think I need to learn more befor doing stuf like this.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice